<?php defined('_JEXEC') or die('Restricted access');
jimport('joomla.filter.output');
include_once(JPATH_ROOT.DS.'administrator'.DS.'includes'.DS.'submenu.php');	 
?>
<?php JHTML::_('behavior.tooltip'); ?>
<form action="index.php" method="post" name="adminForm">
	<div id="editcell">
		<table class="adminlist" style="width: 800px;">

			<thead>
				<th width="5"><?php echo JText::_( 'NUM' ); ?>
				</th>
				<th width="20"><input type="checkbox" name="toggle" value=""
					onclick="checkAll(<?php echo count( $this->items ); ?>);" />
				</th>
				<th><?php echo JText::_( 'Tên Yahoo' ); ?></th>
				<th><?php echo JText::_( 'Nick Yahoo' ); ?></th>
                <th><?php echo JText::_( 'Tên Skype' ); ?></th>
				<th><?php echo JText::_( 'Nick Skype' ); ?></th>				
				<th width="100"><?php echo JHTML::_('grid.sort',  'Published', 's.published'); ?></th>
				<th width="100"><?php echo JHTML::_('grid.sort',  'Order', 's.ordering' ); ?>
				<?php  echo JHTML::_('grid.order',  $this->items ); ?>
				</th>
				<th width="5"><?php echo JText::_( 'ID' ); ?></th>
			</thead>
			<?php
			$k = 0;
			for ($i=0, $n=count( $this->items ); $i < $n; $i++)	{
				$row = &$this->items[$i];
				$checked 	= JHTML::_('grid.id',   $i, $row->hotro_id );
				$link 		= JRoute::_( 'index.php?option=com_hotro&controller=hotro&task=edit&cid[]='. $row->hotro_id );
				$published 	= JHTML::_('grid.published', $row, $i );
				?>
			<tr class="<?php echo "row$k"; ?>">
				<td align="left"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
				<td align="left"><?php echo $checked; ?></td>
				<td align="center"><a href="<?php echo $link; ?>"><?php echo $row->nameyh; ?> </a></td>
				<td align="center"><a href="<?php echo $link; ?>"><?php echo $row->nickname1; ?> </a></td>
                <td align="center"><a href="<?php echo $link; ?>"><?php echo $row->namesky; ?> </a></td>
				<td align="center"><a href="<?php echo $link; ?>"><?php echo $row->nickname3; ?> </a></td>				
				<td align="center"><?php echo $published ;	?></td>
				<td class="order" align="center">
					<span> <?php echo $this->pagination->orderUpIcon( $i, ($row->parent_id == @$this->items[$i-1]->parent_id),'orderup', 'Move Up', true ); ?></span> 
					<span> <?php echo $this->pagination->orderDownIcon( $i, $n, ($row->parent_id == @$this->items[$i+1]->parent_id), 'orderdown', 'Move Down', true ); ?></span> 
					<input type="text" name="ordering[]" size="5" value="<?php echo $row->ordering;?>" class="text_area" style="text-align: center" />
				</td>
				<td align="left"><?php echo $row->hotro_id; ?></td>
			</tr>
			<?php
			$k = 1 - $k;
			}
			?>
		</table>
	</div>
	<input type="hidden" name="option" value="com_hotro" /> <input	type="hidden" name="task" value="" /> 
	<input type="hidden" name="boxchecked" value="0" /> 
	<input type="hidden" name="controller"	value="hotro" />
	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" /> 
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
</form>
